// 检查权限

import store from '@/store'
// 导出一个混入对象
export default {
    methods: {
        checkPermission(key) {
            const userInfo = store.state.user.userInfo
            if (userInfo && userInfo.roles && userInfo.roles.points && userInfo.roles.points.length>0) {
                return userInfo.roles.points.some(item => item === key)
            }
            return false
        }
    }
}